CFLAGS=-g

SOURCES=memchr.c memcmp.c memcpy.c memmove.c memset.c strcat.c strchr.c strcmp.c \
		strcpy.c strcspn.c strerror.c strlen.c strncat.c strncmp.c strncpy.c \
		strpbrk.c strrchr.c strspn.c strstr.c strtok.c 

PROGRAMS=$(SOURCES:.c=)

all: ${PROGRAMS}

memchr: memchr.c
	${CC} ${CFLAGS} -o $@ $<   
memcmp: memcmp.c
	${CC} ${CFLAGS} -o $@ $< 
memcpy: memcpy.c
	${CC} ${CFLAGS} -o $@ $< 
memmove: memmove.c
	${CC} ${CFLAGS} -o $@ $< 
memset: memset.c
	${CC} ${CFLAGS} -o $@ $< 
strcat: strcat.c
	${CC} ${CFLAGS} -o $@ $< 
strchr: strchr.c
	${CC} ${CFLAGS} -o $@ $< 
strcmp: strcmp.c
	${CC} ${CFLAGS} -o $@ $<   
strcpy: strcpy.c
	${CC} ${CFLAGS} -o $@ $< 
strcspn: strcspn.c
	${CC} ${CFLAGS} -o $@ $< 
strerror: strerror.c
	${CC} ${CFLAGS} -o $@ $< 
strlen: strlen.c
	${CC} ${CFLAGS} -o $@ $< 
strncat: strncat.c
	${CC} ${CFLAGS} -o $@ $< 
strncmp: strncmp.c
	${CC} ${CFLAGS} -o $@ $<
strncpy: strncpy.c
	${CC} ${CFLAGS} -o $@ $<   
strpbrk: strpbrk.c
	${CC} ${CFLAGS} -o $@ $< 
strrchr: strrchr.c
	${CC} ${CFLAGS} -o $@ $< 
strspn: strspn.c
	${CC} ${CFLAGS} -o $@ $< 
strstr: strstr.c
	${CC} ${CFLAGS} -o $@ $< 
strtok: strtok.c
	${CC} ${CFLAGS} -o $@ $< 
    
clean:
	rm -rf ${PROGRAMS}
